<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>新增角色</title>
		
		<script type="text/javascript" src="js/vue.js"></script>
		<script type="text/javascript" src="js/ajax.js"></script>
		<script type="text/javascript" src="js/jquery-1.7.2.js"></script>
		<style type="text/css">
			#insertRoleMain{
				margin: auto ;
				width: 500px;
				height: 200px;
				text-align: center;
				
				
			}
			header{
				margin: 50px;
				color: red;
			}
		</style>
	</head>
	<body>
		<div id="insertRoleMain">
			<header>添加新的角色</header>
			角色名称：<input type="text"  v-model="name" />
			<br />
			<input type="button"  value="确定" v-on:click="post"/>
		</div>
	</body>
	<script type="text/javascript">
	    var vue=new Vue({
			el:"#insertRoleMain",
			data:{
				name:'',
			},
			methods:{
				post:function(){
					
					var url='http://localhost:8080/attendance-service/fangyahao/role';
					
					var data = {
						flag:"insert",
						name:this.name
					}
					
					postsend(url,data,function(rs){
						window.location.href="roleShow.html";
					});
				}
			}
		});
		
		
	</script>
</html>
